package com.lihao.sam.controller;

import com.lihao.sam.entity.ApartmentRepaired;
import com.lihao.sam.service.intf.ApartmentRepairedService;
import com.lihao.sam.vo.PageVo;
import com.lihao.sam.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author Qinheyun
 * @Description:TODO
 */
@RestController
@RequestMapping("/api/arc/")
public class ApartmentRepairedController {
    @Resource
    private ApartmentRepairedService service;

    @PostMapping("add.do")
    public R add(ApartmentRepaired apartmentRepaired){
        return service.add(apartmentRepaired);
    }

    @PostMapping("update.do")
    public R update(ApartmentRepaired apartmentRepaired){
        return service.update(apartmentRepaired);
    }

    @PostMapping("del.do")
    public R del(int id){
        return service.del(id);
    }

    @GetMapping("page.do")
    public PageVo all(String personApproval, Integer approval, int page, int limit){
        return service.all(personApproval,approval,page,limit);
    }
}
